﻿using EFFC.Frame.Net.Module.Extend.EWRA.Attributes;
using XHRPMIS.Common;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using ICPFrameLib.Business;
using ICPFrameLib.Attributes;
using ICPFrameLib.Common;

namespace XHRPMIS.Business.v1._0
{
    public class Version:MyRestLogic
    {
        [EWRARoute("get", "/version")]
        [EWRARouteDesc("获取系统Version")]
        [EWRAOutputDesc("返回结果", @"{
code:""success-成功，failed-失败"",
msg:""提示信息"",
data:{
icp_version:ICP快发框架的版本号,
effc_version:底层EFFC框架版本号
}
}")]
        public object GetMyMsg()
        {
            SetCacheEnable(false);
            var ver = ICPSystemVersion.CurrentVersion;
            return new
            {
                code = "success",
                msg = "",
                data = new
                {
                    icp_version = ver.ICPVersion.ToString(),
                    effc_version = ver.EFFCVersion.ToString()
                }
            };
        }

    }
}
